package com.example.start

class DataBean {
    var imageRes: Int? = null
    var imageUrl: String? = null
    var title: String?
    var viewType: Int

    constructor(imageRes: Int?, title: String?, viewType: Int) {
        this.imageRes = imageRes
        this.title = title
        this.viewType = viewType
    }

    constructor(imageUrl: String?, title: String?, viewType: Int) {
        this.imageUrl = imageUrl
        this.title = title
        this.viewType = viewType
    }

    companion object {

        //测试数据，如果图片链接失效请更换
        val testData3: List<DataBean>
            get() {
                val list: MutableList<DataBean> = ArrayList()
                list.add(
                    DataBean(
                        "https://www.gov.cn/shouye/datu/202404/W020240425740314923180_ORIGIN.jpg",
                        "习近平视察陆军军医大学",
                        1
                    )
                )
                list.add(
                    DataBean(
                        "https://www.gov.cn/shouye/datu/202404/W020240426296737538129_ORIGIN.jpg",
                        "神州十八号3名航天员顺利进驻中国空间站",
                        1
                    )
                )
                list.add(
                    DataBean(
                        "https://www.gov.cn/shouye/datu/202404/W020240426296981255937_ORIGIN.jpg",
                        "爱在开端，点亮未来",
                        1
                    )
                )
                list.add(
                    DataBean(
                        "https://s2.loli.net/2024/04/26/zrBFPflLXnjVKy5.png",
                        null,
                        1
                    )
                )
                return list
            }
    }
}